package lqb;

import java.util.Scanner;

public class 存储晶体 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        String string = scan.nextLine();
        int n = scan.nextInt();
        for (int i = 0; i < n; i++) {
            int nextInt = scan.nextInt();
            String[] split = string.split(" ");
            double a = Double.parseDouble(split[0]);
            double b = Double.parseDouble(split[1]);
            double diagonal = Math.sqrt(a * a + b * b);
            if (nextInt < diagonal) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }




        scan.close();
    }
}
